import {defineStore} from 'pinia'
import {ElMessage} from 'element-plus'


const useVideoStore = defineStore('video', {
    state: () => {
        return {
            uploadVideoInfo: {
                videoUrl: undefined,
                description: "",
                coverUrl: "",
                title: ""
            },
        }
    },
    persist: {
        // 自定义持久化方式
        storage: window.localStorage,
        afterRestore: (context) => {
        },
    },
    actions: {
        // 新增视频任务
        updateVideoInfo(val) {
            this.uploadVideoInfo = {...val}
        },
    },
    getters: {},
})

export default useVideoStore
